Add /symdb/v1/input proxy endpoint to bottlecap#1159
Add /symdb/v1/input proxy endpoint to bottlecap#1159jchrostek-dd wants to merge 1 commit intomainfrom
Conversation
Adds support for the Symbol Database upload endpoint, enabling
dd-trace-py's SymbolDatabaseUploader to send symbol data through
the extension to the Datadog backend.
SymDB uses the same backend as the debugger (debugger-intake.{site}/api/v2/debugger),
matching the behavior of the Go trace agent's symDBProxyHandler.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds support for the /symdb/v1/input proxy endpoint to the bottlecap trace agent, enabling Python's SymbolDatabaseUploader to send symbol data to the Datadog backend. This is necessary for the Live Debugger's "Debug with Bits" feature to work on Lambda functions. The implementation mirrors the Go trace agent's implementation and routes symbol database uploads through the same debugger-intake backend as the debugger endpoints.
Changes:
- Adds the
/symdb/v1/inputendpoint that proxies requests to the debugger-intake backend - Includes the endpoint in the
/inforesponse for tracer discoverability - Adds detailed logging for debugger proxy requests to aid debugging efforts
| if let Ok(body_str) = std::str::from_utf8(&body) { | ||
| let preview = if body_str.len() > 1000 { | ||
| format!("{}... (truncated)", &body_str[..1000]) | ||
| } else { | ||
| body_str.to_string() | ||
| }; | ||
| debug!("TRACE_AGENT | Debugger payload preview: {}", preview); |
There was a problem hiding this comment.
The logging code on lines 695-701 logs up to 1000 characters of the payload body for debugger endpoints. This could expose sensitive information such as source code, variable names, and other context from debugger snapshots. Consider logging only non-sensitive metadata (e.g., payload size, timestamp) instead of actual payload content.
Summary
POST /symdb/v1/inputproxy endpoint to the bottlecap trace agentSymbolDatabaseUploaderto send symbol data through the extension to the Datadog backend (required for Live Debugger's "Debug with Bits" feature on Lambda)debugger-intake.{site}/api/v2/debugger), matching the Go trace agent'ssymDBProxyHandlerinpkg/trace/api/symdb.go/inforesponse so tracers can discover itContext
Without this endpoint,
SymbolDatabaseUploaderin dd-trace-py successfully uploads 287 scopes tolocalhost:8126/symdb/v1/inputbut receives a 404 from the extension, preventing SymDB from being populated. This blocks the "Debug with Bits" /datadog_create_datadog_logpointMCP tool from resolving source file paths for Python Lambda functions.Test plan
cargo checkpasses (verified locally)POST /symdb/v1/inputreturns 200 and proxies todebugger-intake.datadoghq.com/api/v2/debugger/inforesponse🤖 Generated with Claude Code